<?php $this->load->view('header/standard'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
            <?php if (isset($messages)) echo $messages; ?>

            <div id="submenu-container" class="span-17 last">
                <?php $this->load->view('menu/profile'); ?>
            </div>

            <form action="" method="post">
            <fieldset class="span-16 last box">
                <legend class="caps"><?=lang('profile.club.Add_Club')?></legend>
                <?php if (count($clubs) > 0):?>
	            <div class="span-15 last">
					<p>
						<label for="club">Club: </label>
						<?php echo form_dropdown('club', $clubs); ?>
					</p>
					<p>
						<label for="joined"><?=lang('profile.club.Joined')?>: </label> 
						<input type="text" name="joined" id="datepicker" size="10" maxlength="10" />
					</p>
					<p>
						<label for="member"><?=lang('profile.club.Member')?>: </label> 
						<input type="text" name="member" />
					</p>
	            </div>
	            <div class="span-16 last">
				    <p><?php echo form_submit('action',lang('profile.club.Add')); ?></p>
				</div>
				<?php else: ?>
				<p class="error span-15"><?=lang('profile.club.No_more_clubs_to_add')?></p>
				<?php endif; ?> 
           </fieldset>
           </form>
        </div> <!-- end content -->
          <div class="span-6 last" id="sidebar">
            <?php $this->load->view('menu/sidebar', array('person' => $person, 'context' => 'pilot'))?>
          </div> <!-- end sidebar -->
    </div> <!-- end container -->
    <script type="text/javascript">
        $(function() {
            $("#datepicker").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
        });
    </script>
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
